package io;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class CopyDemo {
    public static void main(String[] args) throws IOException {
        FileInputStream inp=new FileInputStream("1.jpg");
        FileOutputStream outp=new FileOutputStream("1_cp.jpg");
        int a;
        while ((a= inp.read())!=-1){
            outp.write(a);
        }
        System.out.println("复制完毕");
        inp.close();
        outp.close();
    }
}
